package com.example.emos.wx.core.exception;

import lombok.Data;



/**
 * 自定义异常类：EmosException
 *
 * @Author YinXi
 * @Versin 1.0.0
 * @Date 2023/7/25
 */
@Data
public class EmosException extends RuntimeException{
    /**保存异常消息*/
    private String msg;
    /**状态码，默认为500*/
    private int code= 500;


    public EmosException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public EmosException(String msg,Throwable e) {
        super(msg,e);
        this.msg = msg;
    }

    public EmosException(String msg,int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public EmosException(String msg,Throwable e,int code) {
        super(msg,e);
        this.msg = msg;
        this.code = code;
    }
}
